﻿using BaiTu.CachingEntity;
using BaiTu.CachingServices.CacheProvider.LocalCache;
using BaiTu.ICachingServices;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BaiTu.CachingServices.Coordinator.Wrappers
{
    public class LocalCacheWrapper : ICacheProvider
    {
        private BaseCacheContainer cacheContainer;
        public LocalCacheWrapper(BaseCacheContainer cacheContainer)
        {
            this.cacheContainer = cacheContainer;
        }

        public void Put(string key, object value, CacheExpireType expireType, double increment)
        {
            this.cacheContainer.Set(key, value, expireType, increment);
        }

        public object Get(string key)
        {
            return this.cacheContainer.Get(key);
        }

        public void Remove(string key)
        {
            this.cacheContainer.Remove(key);
        }
    }
}
